-
Notifications
You must be signed in to change notification settings - Fork 25.6k
ESQL: Report original_types #124913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESQL: Report original_types #124913
Conversation
Adds the `original_types` to the description of ESQL's `unsupported`
fields. This looks like:
```
{
"name" : "a",
"type" : "unsupported",
"original_types" : [
"long",
"text"
]
}
```
for union types. And like:
```
{
"name" : "a",
"type" : "unsupported",
"original_types" : [
"date_range"
]
}
```
for truly unsupported types.
This information is useful for the UI. For union types it can suggest
that users append a cast.
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
|
Pinging @elastic/kibana-esql (ES|QL-ui) |
|
Hi @nik9000, I've created a changelog YAML for you. |
|
Good idea. {
"name" : "a",
"type" : "unsupported",
"type_info" : {
"original_types": [ "date_range"]
}
},
// aspirational
{
"name" : "a",
"type" : "union", // <-- different from unsupported
"type_info" : {
"original_types": [ "text", "long"],
"safe_cast": ["text"]
}
} |
| * be actually supported types. | ||
| */ | ||
| @Nullable | ||
| public List<String> originalTypes() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Attribute != Field
This information makes sense only in the case of unsupported fields (potentially union types in the future) and thus makes sense on FieldAttribute & co (such as UnsupportedAttribute) alone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what you mean.
|
P.S. Removed 9.0 since it has the same restrictions as 8.18 - did you mean 8.19? |
That makes sense. Let's leave it out. |
|
I don't know if we can change the type from |
|
@costin do you think I should change the format to be: In this PR? Edit: I didn't make this change as part of this PR. |
|
@costin I've pushed a change that moves how we communicate the original types out the rest API. I didn't change the json layout yet. That's a little trickier - but still fine. Just a bit trickier. |
|
If you want me to change the layout I can, but unless you really want it I think I won't. |
This reverts commit 09c515e.
|
I talked with @costin last night and he approved this if I went back to the first way I was flowing the unsupported types through the system. We don't really agree on the right way to do this, but that's how things are when you build stuff together. Compromise. I've pushed that and will set this to auto-merge. |
Adds the `original_types` to the description of ESQL's `unsupported`
fields. This looks like:
```
{
"name" : "a",
"type" : "unsupported",
"original_types" : [
"long",
"text"
]
}
```
for union types. And like:
```
{
"name" : "a",
"type" : "unsupported",
"original_types" : [
"date_range"
]
}
```
for truly unsupported types.
This information is useful for the UI. For union types it can suggest
that users append a cast.
Claims a transport version in main that we will use to backport elastic#124913 to 8.19.
Adds the `original_types` to the description of ESQL's `unsupported`
fields. This looks like:
```
{
"name" : "a",
"type" : "unsupported",
"original_types" : [
"long",
"text"
]
}
```
for union types. And like:
```
{
"name" : "a",
"type" : "unsupported",
"original_types" : [
"date_range"
]
}
```
for truly unsupported types.
This information is useful for the UI. For union types it can suggest
that users append a cast.
|
Backport to 8.19.0: #127641 |
Adds the `original_types` to the description of ESQL's `unsupported`
fields. This looks like:
```
{
"name" : "a",
"type" : "unsupported",
"original_types" : [
"long",
"text"
]
}
```
for union types. And like:
```
{
"name" : "a",
"type" : "unsupported",
"original_types" : [
"date_range"
]
}
```
for truly unsupported types.
This information is useful for the UI. For union types it can suggest
that users append a cast.
Adds the
original_typesto the description of ESQL'sunsupportedfields. This looks like:for union types. And like:
for truly unsupported types.
This information is useful for the UI. For union types it can suggest that users append a cast.